package cn.swust.designpatternlearningplatform.domain.entity;

import lombok.ToString;

import java.time.LocalDateTime;
import java.util.Date;
import java.io.Serializable;

/**
 * (DailyExercise)实体类
 *
 * @author makejava
 * @since 2023-04-15 21:11:13
 */
@ToString
public class DailyExercise implements Serializable,Cloneable{

    private static final long serialVersionUID = -90970143162726466L;
    public static final Integer WRONG =0 ;
    public static final Integer RIGHT=1;
    /**
     * 日常训练表，自己做的题，不涉及组成练习卷
     */
    private Integer id;
    /**
     * 学号
     */
    private String studentNumber;
    /**
     * 题目id
     */
    private Integer topicId;
    /**
     * 自己选择的答案
     */
    private String ownAnswer;
    /**
     * 是否正确，0表示正确，1表示错误
     */
    private Integer isRight;
    /**
     * 做题时间，日历图需要
     */
    private LocalDateTime problemTime;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getStudentNumber() {
        return studentNumber;
    }

    public void setStudentNumber(String studentNumber) {
        this.studentNumber = studentNumber;
    }

    public Integer getTopicId() {
        return topicId;
    }

    public void setTopicId(Integer topicId) {
        this.topicId = topicId;
    }

    public String getOwnAnswer() {
        return ownAnswer;
    }

    public void setOwnAnswer(String ownAnswer) {
        this.ownAnswer = ownAnswer;
    }

    public Integer getIsRight() {
        return isRight;
    }

    public void setIsRight(Integer isRight) {
        this.isRight = isRight;
    }

    public LocalDateTime getProblemTime() {
        return problemTime;
    }

    public void setProblemTime(LocalDateTime problemTime) {
        this.problemTime = problemTime;
    }

    @Override
    public DailyExercise clone() {
        try {
            // TODO: copy mutable state here, so the clone can't change the internals of the original
            return (DailyExercise) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new AssertionError();
        }
    }
}

